import { FC, useState } from 'react'
const Upload: FC = () => {
  const [fileName, setFileUrl] = useState<object>({})
  const changeUrl = async (e: any) => {
    e.preventDefault()
    console.log(e,221)
    const file = e.target.files && e.target.files[0]
    console.log(file,2233)
    setFileUrl(file)
  }
  return (
    <div className={'box'}>
      <input className={'btn'} type={'button'} value={'上传文件'} />
      <input className='fileinp' type='file' accept='.xlsx,.xls,.png' onChange={changeUrl} />
    </div>
  )
}
export default Upload
